package com.summer.leetcode;

import java.util.TreeSet;

public class Solution4 {

    public static double findMedianSortedArrays(int[] nums1, int[] nums2) {
    	TreeSet<Integer> set = new TreeSet<Integer>();
    	
    	for(int i : nums1) {
    		set.add(i);
    	}
    	
    	for(int i : nums2) {
    		set.add(i);
    	}
    	
    	double median = set.size() / 2d;
    	int medianl = (int) median;
    	int medianr = (int) (median + 0.5);
    	
    	return (set.size()) / 2f;
    }
	
}
